<template>
  <div><h4>添加员工</h4>
        姓名:{{emObj.name}}<br>
        电话:<input type="text" v-model="emObj.tel"><br>
        职位:{{emObj.job}}<br><br>
        生日:{{emObj.birthDay}}<br><br>
        头像：{{emObj.face}}<img :src=emObj.face width="200" height="200"><br>

         <input type="submit" value="修改" @click="updateEm()"></div>
</template>

<script>
export default {
        props:["emObj"],

        
       methods:{
       async updateEm(){
           var em = {};
          em.id=this.emObj.id;
          em.tel=this.emObj.tel;
           if(this.emObj.tel != null){
        var info =  await this.ajax.getSubmit("/project/em/update",em);
              if(info == "ok"){
                  alert("修改成功");
                   this.$emit("findByItem",{page:1});
                  
              }
              } else{
                  alert("请填写修改的价格");
              }
        }
    }
}
</script>

<style>

</style>